<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="moduleList" />
<link href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function() {
	$("#btnQuery").click(function(){
		$("#salesForm").submit();
		
	});
	$(".chosen-select").chosen({});
	//货币格式化
	$('[data-accounting]').each(function (){
		var $this = $(this);
		if($this.attr("data-accounting-precision") && ""!=$this.attr("data-accounting-precision")){
			$this.html(accounting.formatMoney($this.attr("data-accounting"),"¥ ",$this.attr("data-accounting-precision")*1));
		}else{
			$this.html(accounting.formatMoney($this.attr("data-accounting"),"¥ "));
		}
	});
});
</script>
</head>
<body>
    	<div class="panel-heading col-xs-12">
				    <h3 class="panel-title o-v-action">
				    	销售明细列表
				    	<a class="btn btn-success btn-sm pull-right"  href="${contextPath}/biz/statement/statementSaleDetail/exportExcel?billNo=${billNo}">导出列表到Excel</a>
				    </h3>
				   
				  </div>
		<tags:message content="${message}"/>
		<table class="table table-striped table-hover " id="table1">
			<thead>
				<tr>
								
								<th>销售单号</th>
								<th>商品条码</th>
								<th>单价</th>
								<th>销售数量</th>
								<th>收银金额</th>
								<th>储值卡金额</th>
								<th>信用卡金额</th>
							</tr>
			</thead>
			<tbody>
				<c:forEach items="${list}" var="statementSaleDetail">
								<tr data-herf="${contextPath}/biz/statement/statementSaleDetail/view?id=${statementSaleDetail.id}" data-target="_self">
									<td >${statementSaleDetail.billNo}</td>
									<td>${statementSaleDetail.barCode}</td>
									<td data-accounting="${statementSaleDetail.price}"></td>
									<td>${statementSaleDetail.quantity}</td>
									<td data-accounting="${statementSaleDetail.amount}"></td>
									<td data-accounting="${statementSaleDetail.prepaidCardAmount}"></td>
									<td data-accounting="${statementSaleDetail.creditCardAmount}"></td>								
								</tr>
							</c:forEach>
			</tbody>
		</table>
		<div class="o-l-page">
			<div class="col-sm-6">
				<ul class="pagination">
					<li class="disabled"><a href="javascript:">&#171; 上一页</a></li>
					<li class="disabled"><a href="#">1</a></li>
					<li class="disabled"><a href="#">下一页 &#187;</a></li>
				</ul>
			</div>
			<div class="col-sm-6">
				<span class="pull-right">
					到第<input class="form-control input-sm input-goto" type="text">页
					<button class="btn btn-sm btn-primary" role="button">go</button>
					&nbsp&nbsp
					<a class="btn btn-default btn-sm pull-right"  role="button" href="javascript:void(0)" onclick="history.go(-1)" >返回</a>
				</span>
			</div>
		</div>
		<script type="text/javascript">
			$('.form_date').datetimepicker({
		        language:  'zh-CN',
		        weekStart: 1,
		        todayBtn:  1,
				autoclose: 1,
				todayHighlight: 1,
				startView: 2,
				minView: 2,
				forceParse: 0,
				format: 'yyyy-mm-dd'
		    });

</script>
	<script type="text/javascript" src="${staticPath}/js/list.js"></script>
	<script src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
	<script src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
	<script src="${staticPath}/lib/chosen/1.1.0/chosen.jquery.js" type="text/javascript"></script>
	<script src="${staticPath}/js/ossp-jquery-chosen.js" type="text/javascript"></script>
	<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js" type="text/javascript"></script>
</body>
</html>